package com.example.terminalservice.service.impl;

import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.terminalservice.common.Result;
import com.example.terminalservice.pojo.Session;
import com.example.terminalservice.service.SessionService;
import com.example.terminalservice.mapper.SessionMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* @author 28142
* @description 针对表【sys_session】的数据库操作Service实现
* @createDate 2023-08-09 16:29:28
*/
@Service
public class SessionServiceImpl extends ServiceImpl<SessionMapper, Session>
    implements SessionService{
    @Autowired
    private SessionMapper sessionMapper;

    @Override
    public Result findPage(Integer pageNum, Integer pageSize, String name, String host) {
        Page<Session> page = new Page<>(pageNum, pageSize);
        Page<Session> list = sessionMapper.selectAllPaged(page, name, host);
        return Result.success(list);
    }
}




